﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Contoso.Workflow.Management;
using Contoso.Workflow.IManagement;
using Contoso.Workflow.Factory;
using Contoso.Workflow.LocalService;
using System.Collections.Generic;
using Contoso.Workflow.Model;

public partial class TaskList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        WorkItemMgr workItemMgr = new WorkItemMgr();

        IUser user = ManagementFactory.CreateUser(Session);
        string currentUser = user.GetCurrentUserId();

        List<ExpenseData> expenseDataList = workItemMgr.GetUserWaitingWorkItems(currentUser);
        GridView1.DataSource = expenseDataList;
        GridView1.DataBind();
    }
}
